package org.jsola.hr.dto;

import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;
import org.hibernate.validator.constraints.Length;
import org.jsola.core.dto.BaseDTO;

import javax.validation.constraints.NotNull;

import static org.jsola.hr.example.GregorianCalendarExample.E_COMPANY_ID;
import static org.jsola.hr.example.GregorianCalendarExample.E_DAILY;
import static org.jsola.hr.example.GregorianCalendarExample.E_DATE_STR;
import static org.jsola.hr.example.GregorianCalendarExample.E_DATE_TYPE;
import static org.jsola.hr.example.GregorianCalendarExample.E_MONTHLY;
import static org.jsola.hr.example.GregorianCalendarExample.E_YEARLY;
import static org.jsola.hr.example.GregorianCalendarExample.M_COMPANY_ID_MAX;
import static org.jsola.hr.example.GregorianCalendarExample.M_COMPANY_ID_NOT_NULL;
import static org.jsola.hr.example.GregorianCalendarExample.M_DAILY_MAX;
import static org.jsola.hr.example.GregorianCalendarExample.M_DATE_STR_MAX;
import static org.jsola.hr.example.GregorianCalendarExample.M_MONTHLY_MAX;
import static org.jsola.hr.example.GregorianCalendarExample.M_YEARLY_MAX;
import static org.jsola.hr.example.GregorianCalendarExample.N_COMPANY_ID;
import static org.jsola.hr.example.GregorianCalendarExample.N_DAILY;
import static org.jsola.hr.example.GregorianCalendarExample.N_DATE_STR;
import static org.jsola.hr.example.GregorianCalendarExample.N_DATE_TYPE;
import static org.jsola.hr.example.GregorianCalendarExample.N_MONTHLY;
import static org.jsola.hr.example.GregorianCalendarExample.N_YEARLY;

/**
 * @author zhr
 */
@EqualsAndHashCode(callSuper = true)
@ApiModel(description = "新增【公历表】的参数")
@Data
public class GregorianCalendarAddDTO extends BaseDTO {

    private static final long serialVersionUID = 1L;

    @ApiModelProperty(notes = N_YEARLY, example = E_YEARLY)
    @Length(max = 10, message = M_YEARLY_MAX)
    private String yearly;

    @ApiModelProperty(notes = N_MONTHLY, example = E_MONTHLY)
    @Length(max = 10, message = M_MONTHLY_MAX)
    private String monthly;

    @ApiModelProperty(notes = N_DAILY, example = E_DAILY)
    @Length(max = 10, message = M_DAILY_MAX)
    private String daily;

    @ApiModelProperty(notes = N_DATE_STR, example = E_DATE_STR)
    @Length(max = 20, message = M_DATE_STR_MAX)
    private String dateStr;

    @ApiModelProperty(notes = N_DATE_TYPE, example = E_DATE_TYPE)
    private Integer dateType;

    @ApiModelProperty(notes = N_COMPANY_ID, example = E_COMPANY_ID, required = true)
    @NotNull(message = M_COMPANY_ID_NOT_NULL)
    @Length(max = 32, message = M_COMPANY_ID_MAX)
    private String companyId;


}

